3.47 \(\int (a+b \log (c (d+e x)^n))^2 \, dx\)

Optimal. Leaf size=65 \[ \frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}-2 a b n x-\frac {2 b^2 n (d+e x) \log \left (c (d+e x)^n\right )}{e}+2 b^2 n^2 x \]

[Out]

-2*a*b*n*x+2*b^2*n^2*x-2*b^2*n*(e*x+d)*ln(c*(e*x+d)^n)/e+(e*x+d)*(a+b*ln(c*(e*x+d)^n))^2/e

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {2389, 2296, 2295} \[ \frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}-2 a b n x-\frac {2 b^2 n (d+e x) \log \left (c (d+e x)^n\right )}{e}+2 b^2 n^2 x \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])^2,x]

[Out]

-2*a*b*n*x + 2*b^2*n^2*x - (2*b^2*n*(d + e*x)*Log[c*(d + e*x)^n])/e + ((d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)
/e

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e x\right )}{e}\\ &=\frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}-\frac {(2 b n) \operatorname {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e}\\ &=-2 a b n x+\frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}-\frac {\left (2 b^2 n\right ) \operatorname {Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e}\\ &=-2 a b n x+2 b^2 n^2 x-\frac {2 b^2 n (d+e x) \log \left (c (d+e x)^n\right )}{e}+\frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 59, normalized size = 0.91 \[ \frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}-2 b n \left (a x+\frac {b (d+e x) \log \left (c (d+e x)^n\right )}{e}-b n x\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])^2,x]

[Out]

((d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/e - 2*b*n*(a*x - b*n*x + (b*(d + e*x)*Log[c*(d + e*x)^n])/e)

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 140, normalized size = 2.15 \[ \frac {b^{2} e x \log \relax (c)^{2} + {\left (b^{2} e n^{2} x + b^{2} d n^{2}\right )} \log \left (e x + d\right )^{2} - 2 \, {\left (b^{2} e n - a b e\right )} x \log \relax (c) + {\left (2 \, b^{2} e n^{2} - 2 \, a b e n + a^{2} e\right )} x - 2 \, {\left (b^{2} d n^{2} - a b d n + {\left (b^{2} e n^{2} - a b e n\right )} x - {\left (b^{2} e n x + b^{2} d n\right )} \log \relax (c)\right )} \log \left (e x + d\right )}{e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))^2,x, algorithm="fricas")

[Out]

(b^2*e*x*log(c)^2 + (b^2*e*n^2*x + b^2*d*n^2)*log(e*x + d)^2 - 2*(b^2*e*n - a*b*e)*x*log(c) + (2*b^2*e*n^2 - 2
*a*b*e*n + a^2*e)*x - 2*(b^2*d*n^2 - a*b*d*n + (b^2*e*n^2 - a*b*e*n)*x - (b^2*e*n*x + b^2*d*n)*log(c))*log(e*x
 + d))/e

________________________________________________________________________________________

giac [B]  time = 0.18, size = 178, normalized size = 2.74 \[ {\left (x e + d\right )} b^{2} n^{2} e^{\left (-1\right )} \log \left (x e + d\right )^{2} - 2 \, {\left (x e + d\right )} b^{2} n^{2} e^{\left (-1\right )} \log \left (x e + d\right ) + 2 \, {\left (x e + d\right )} b^{2} n e^{\left (-1\right )} \log \left (x e + d\right ) \log \relax (c) + 2 \, {\left (x e + d\right )} b^{2} n^{2} e^{\left (-1\right )} + 2 \, {\left (x e + d\right )} a b n e^{\left (-1\right )} \log \left (x e + d\right ) - 2 \, {\left (x e + d\right )} b^{2} n e^{\left (-1\right )} \log \relax (c) + {\left (x e + d\right )} b^{2} e^{\left (-1\right )} \log \relax (c)^{2} - 2 \, {\left (x e + d\right )} a b n e^{\left (-1\right )} + 2 \, {\left (x e + d\right )} a b e^{\left (-1\right )} \log \relax (c) + {\left (x e + d\right )} a^{2} e^{\left (-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))^2,x, algorithm="giac")

[Out]

(x*e + d)*b^2*n^2*e^(-1)*log(x*e + d)^2 - 2*(x*e + d)*b^2*n^2*e^(-1)*log(x*e + d) + 2*(x*e + d)*b^2*n*e^(-1)*l
og(x*e + d)*log(c) + 2*(x*e + d)*b^2*n^2*e^(-1) + 2*(x*e + d)*a*b*n*e^(-1)*log(x*e + d) - 2*(x*e + d)*b^2*n*e^
(-1)*log(c) + (x*e + d)*b^2*e^(-1)*log(c)^2 - 2*(x*e + d)*a*b*n*e^(-1) + 2*(x*e + d)*a*b*e^(-1)*log(c) + (x*e
+ d)*a^2*e^(-1)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 130, normalized size = 2.00 \[ -\frac {2 b^{2} d \,n^{2} \ln \left (e x +d \right )}{e}+2 b^{2} n^{2} x -2 b^{2} n x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )+b^{2} x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}+\frac {2 a b d n \ln \left (e x +d \right )}{e}-2 a b n x +2 a b x \ln \left (c \left (e x +d \right )^{n}\right )+\frac {b^{2} d \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}}{e}+a^{2} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*ln(c*(e*x+d)^n)+a)^2,x)

[Out]

a^2*x+b^2*x*ln(c*exp(n*ln(e*x+d)))^2+b^2*d/e*ln(c*exp(n*ln(e*x+d)))^2+2*b^2*n^2*x-2*b^2*n*x*ln(c*exp(n*ln(e*x+
d)))-2*n^2*b^2*d/e*ln(e*x+d)+2*a*b*x*ln(c*(e*x+d)^n)-2*a*b*n*x+2*a*b/e*n*d*ln(e*x+d)

________________________________________________________________________________________

maxima [B]  time = 1.00, size = 131, normalized size = 2.02 \[ -2 \, a b e n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} + b^{2} x \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + 2 \, a b x \log \left ({\left (e x + d\right )}^{n} c\right ) - {\left (2 \, e n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {{\left (d \log \left (e x + d\right )^{2} - 2 \, e x + 2 \, d \log \left (e x + d\right )\right )} n^{2}}{e}\right )} b^{2} + a^{2} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))^2,x, algorithm="maxima")

[Out]

-2*a*b*e*n*(x/e - d*log(e*x + d)/e^2) + b^2*x*log((e*x + d)^n*c)^2 + 2*a*b*x*log((e*x + d)^n*c) - (2*e*n*(x/e
- d*log(e*x + d)/e^2)*log((e*x + d)^n*c) + (d*log(e*x + d)^2 - 2*e*x + 2*d*log(e*x + d))*n^2/e)*b^2 + a^2*x

________________________________________________________________________________________

mupad [B]  time = 0.00, size = 94, normalized size = 1.45 \[ x\,\left (a^2-2\,a\,b\,n+2\,b^2\,n^2\right )+{\ln \left (c\,{\left (d+e\,x\right )}^n\right )}^2\,\left (b^2\,x+\frac {b^2\,d}{e}\right )-\frac {\ln \left (d+e\,x\right )\,\left (2\,b^2\,d\,n^2-2\,a\,b\,d\,n\right )}{e}+2\,b\,x\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (a-b\,n\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*(d + e*x)^n))^2,x)

[Out]

x*(a^2 + 2*b^2*n^2 - 2*a*b*n) + log(c*(d + e*x)^n)^2*(b^2*x + (b^2*d)/e) - (log(d + e*x)*(2*b^2*d*n^2 - 2*a*b*
d*n))/e + 2*b*x*log(c*(d + e*x)^n)*(a - b*n)

________________________________________________________________________________________

sympy [A]  time = 1.48, size = 211, normalized size = 3.25 \[ \begin {cases} a^{2} x + \frac {2 a b d n \log {\left (d + e x \right )}}{e} + 2 a b n x \log {\left (d + e x \right )} - 2 a b n x + 2 a b x \log {\relax (c )} + \frac {b^{2} d n^{2} \log {\left (d + e x \right )}^{2}}{e} - \frac {2 b^{2} d n^{2} \log {\left (d + e x \right )}}{e} + \frac {2 b^{2} d n \log {\relax (c )} \log {\left (d + e x \right )}}{e} + b^{2} n^{2} x \log {\left (d + e x \right )}^{2} - 2 b^{2} n^{2} x \log {\left (d + e x \right )} + 2 b^{2} n^{2} x + 2 b^{2} n x \log {\relax (c )} \log {\left (d + e x \right )} - 2 b^{2} n x \log {\relax (c )} + b^{2} x \log {\relax (c )}^{2} & \text {for}\: e \neq 0 \\x \left (a + b \log {\left (c d^{n} \right )}\right )^{2} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))**2,x)

[Out]

Piecewise((a**2*x + 2*a*b*d*n*log(d + e*x)/e + 2*a*b*n*x*log(d + e*x) - 2*a*b*n*x + 2*a*b*x*log(c) + b**2*d*n*
*2*log(d + e*x)**2/e - 2*b**2*d*n**2*log(d + e*x)/e + 2*b**2*d*n*log(c)*log(d + e*x)/e + b**2*n**2*x*log(d + e
*x)**2 - 2*b**2*n**2*x*log(d + e*x) + 2*b**2*n**2*x + 2*b**2*n*x*log(c)*log(d + e*x) - 2*b**2*n*x*log(c) + b**
2*x*log(c)**2, Ne(e, 0)), (x*(a + b*log(c*d**n))**2, True))

________________________________________________________________________________________